package com.qf.service.impl;

import com.qf.dao.SysUsersMapper;
import com.qf.pojo.SysUsers;
import com.qf.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * @author 千峰教育
 * @Company http://www.mobiletrain.org/
 * @Version 1.0
 */
@Service
public class SysUserServiceImpl implements SysUserService {

    @Autowired
    SysUsersMapper usersMapper;

    @Override
    public SysUsers findByUsername(String username) {
        SysUsers user = usersMapper.findByUsername(username);
        return user;
    }

    @Override
    public Set<String> findRolesByUserId(int id) {
        return usersMapper.findRolesByUserId(id);
    }

    @Override
    public Set<String> findPermsByUserId(int id) {
        return usersMapper.findPermsByUserId(id);
    }
}
